from dotenv import load_dotenv, find_dotenv
from pydantic import ConfigDict
from functools import lru_cache

class Config(ConfigDict):
    # 加载环境变量
    load_dotenv(find_dotenv(), override=True)
    
    # 调试模式
    APP_DEBUG: bool = True
    # 项目信息
    VERSION: str = "1.0.1"
    PROJECT_NAME: str = "xxx"
    DESCRIPTION: str = 'xxxxx'

@lru_cache
def get_config():
    return Config()
